package com.demo.kits;

import java.util.UUID;


public class StringKit {

	public static String getValueByIndex(String value,int index){
		String vArray[] =value.split(",");
		int len = vArray.length;
		if(index<=0){
			index = 0;
		}
		if(index>=len){
			index = len-1;
		}
		return vArray[index];
	}
	
	public static String createUUID(){
		
		UUID uuid = UUID.randomUUID();
		return uuid.toString();
	}
	
	public static boolean isEmptyOrNull(String value){

		if(value==null){
			return true;
		}
		value = value.trim();
		if(value.equals("")){
			return true;
		}
		return false;
	}
}
